<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<c:set value="${pageContext.request.contextPath}" var="path" scope="page" />
<!--文章审核 具体内容-->
<div class="main_tag">求知广场管理>问题管理>文章审核</div>
<div class="sysm1_udiv">
	<!--内容框-->
	<div class="innertag_box">
		<a class="innertag block1" href="#">返回</a>
	</div>
	<div class="innerdetail_box">
	<table width="100%" >
	<tr><td>问题类别：${question.classify}</td></tr>
    <tr><td>问题标题：${question.title}</td></tr>
	<tr><td>发布人：${question.author}</td></tr>
    <tr><td>发布时间：${question.time}</td></tr>
	<tr><td style="border-top:#CCC 1px solid">内容：${question.content }</td></tr>
	</table>
	</div>
	<!--审核按钮-->
	<div class="innertag_box">
	<c:choose>
		<c:when test="${question.checked}">
			<a class="innertag blores" href="#">已通过审核</a>
		</c:when>
		<c:otherwise>
			<a id="check_f" class="innertag blores" href="#">删除</a> 
			<a id="check_t" class="innertag blores" href="#">通过审核</a>
		</c:otherwise>
	</c:choose>
	</div>
</div>
<Script>
	/* return */
	$(".innertag_box").find(".block1").click(function() {
		$("#load").load("${path}/ShowQuestionController",{x: 0});
	});
	/*check confirm */
	$("#check_t").click(function(){
		$.post("${path}/CheckQuestionController",{
			quesId: "${question.quesId}",
			checked:true
			},function(data){
			alert(data);
			$("#load").load("${path}/ShowQuestionController",{x: 0});
		});
	});
	
	/* delete */
	$("#check_f").click(function(){
		$.post("${path}/CheckQuestionController",{
			quesId: "${question.quesId}"
			},function(data){
			alert(data);
			$("#load").load("${path}/ShowQuestionController",{x: 0});
		});
	});
	
		
		

	
</Script>